package com.tarena.lbs.business.dao.mapper;

import com.tarena.lbs.business.pojo.po.BusinessPO;
import com.tarena.lbs.business.pojo.po.StorePO;
import com.tarena.lbs.business.pojo.query.BusinessQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BusinessMapper {
    
    /**
     * 根据ID查询商家信息
     */
    BusinessPO getBusinessById(@Param("id") Integer id);
    
    /**
     * 根据负责人电话查询商家信息
     */
    BusinessPO getBusinessByPhone(@Param("phone") String phone);
    
    /**
     * 保存商家信息
     */
    int save(BusinessPO businessPO);
    
    /**
     * 查询所有商家
     */
    List<BusinessPO> getAllBusinesses(BusinessQuery query);


    List<StorePO> getStoresByBusinessId(Integer businessId);

    List<BusinessPO> getBusinesses();
}
